<?php 	require_once ('inc/swiftmail/lib/swift_required.php');
		include_once('inc/config.inc.php');
		include_once('inc/user.class.php');
		include_once('inc/product.class.php');
		include_once('inc/product.inc.php');
		include_once('inc/order.class.php');
		include_once('inc/user.inc.php');
		include_once('inc/inbox.class.php');
		include_once('inc/img.class.php');
		

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Jönkötrade </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,300' rel='stylesheet' type='text/css'>
<!--[if IE]>
	<link href="http://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
	<link href="http://fonts.googleapis.com/css?family=Lato:400" rel="stylesheet" type="text/css">
	<link href="http://fonts.googleapis.com/css?family=Lato:700" rel="stylesheet" type="text/css">
	<link href="http://fonts.googleapis.com/css?family=Lato:300" rel="stylesheet" type="text/css">
<![endif]-->

<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/theme.css" rel="stylesheet">
<link href="css/colour.css" rel="stylesheet" type="text/css"/>
<link href="css/prettyPhoto.css" rel="stylesheet" type="text/css"/>
<link href="css/zocial.css" rel="stylesheet" type="text/css"/>
<link href="css/animate.css" rel="stylesheet" type="text/css"/>
<!-- SLIDER REVOLUTION 4.x CSS SETTINGS -->
<link rel="stylesheet" type="text/css" href="rs-plugin/css/settings.css" media="screen" />
<link rel="stylesheet" href="css/jquery.cropbox.css" type="text/css" />				

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body>
  <!-- sample modal content -->
  <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">

        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title" id="myModalLabel">Log In</h4>
        </div>
        
		<div class="modal-body">
          
		
	<div class="contact_form">  
	<center><img class="img-circle" src="img/avatar-default.gif"/></center>
	<form method="post" action="index.php" >
			<p class="form_info">
					E-mail address 
			<span class="required"></span>
				</p>
				<input class="col-xs-12 col-sm-12 col-md-8" type="email" value="" name="log_email" style="width:100%"></input><br></br>
				<p class="form_info">Password</p>
				<input class="col-xs-12 col-sm-12 col-md-8" type="password" value="" name="log_password" style="width:100%"></input>

				<br></br>
        </div> </div>
		  <div class="alert alert-info">
      <strong>Info:</strong> This website uses cookies to keep you logged in.
    </div>
        <div class="modal-footer">
          <input type="submit" class="btn btn-primary" value="Connect" />
        </div>
		</form>
	 </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
  </div><!-- /.modal -->
<!--header-->
	<div class="header">
<!--menu-->
    <nav id="main_menu" class="navbar" role="navigation">
      <div class="container">
            <div class="navbar-header">
        <!--toggle-->
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
				<i class="fa fa-bars"></i>
			</button>
		<!--logo-->
			<div class="logo">
				<a href="index.php"><img src="img/logo.png" alt="" class="animated bounceInDown" /></a> 
			</div>
		</div>
           
            <div class="collapse navbar-collapse" id="menu">
                <ul class="nav navbar-nav pull-right" >
                   			<li><a href="index.php">Home</a></li>
							
						<?php //Features to come later
							/*<li class="dropdown"><a href="javascript:{}">Stores</a>
						<ul class="dropdown-menu">
								<li><a href="products.php">Browse all </a></li>
								<li><a href="products.php">Grocery</a></li>
								<li><a href="products.php">Furnitures</a></li>
								<li><a href="products.php">Electronics</a></li>
								<li><a href="products.php">Sport</a></li>
								<li><a href="products.php">Clothing</a></li>
								<li><a href="products.php">Books</a></li>
						</ul>
							</li>*/
						?>	
							<li class="dropdown"><a href="javascript:{}">Trading</a>
						<ul class="dropdown-menu">
								<li><a href="browse_products.php">Browse all products</a></li>
								<li><a href="sell_yours.php">Sell yours</a></li>

						</ul>
							</li>
							<?php if(!$connected)
							{ echo'
							<li class="dropdown"><a href="javascript:{}">Log in / Register</a>
						<ul class="dropdown-menu">
								<li><a href="#myModal" data-toggle="modal" data-target="#myModal">Log in</a></li>
								<li><a href="account.php?op=register" >Register</a></li>
								</ul></li>';
							}
							else // user is connected
							{ echo'
							<li class="dropdown"><a href="javascript:{}">Hi, '.$user->firstname.'</a>
						<ul class="dropdown-menu">
								<li><a href="account.php">Account management</a></li>
								<li><a href="index.php?op=logout" >Disconnect</a></li>
						</ul></li>';
							}
						
						if($connected)
						{
							echo'<li><a href="cart.php">My Cart</a></li>';
						} ?>						
						
							
						
							<li class="dropdown"><a href="javascript:{}">about us</a>
						<ul class="dropdown-menu">
								<li><a href="dribbble_stream.php">About Jönkötrade</a></li>
								<li><a href="alt_footer.php">F.A.Q</a></li>
								<li><a href="pricing_table.php">Contact us</a></li>
						</ul>
							</li>
							
						</ul>
					</div>
				</div>
			</nav>
		</div>
	<!--//header-->
	<?php 
	// ERROR MESSAGES //
	if(isset($error['notconnected'])){ echo '<div class="alert alert-danger" style="margin: 0 0 0 0; text-align: center;"><span>OOPS ! </span> '.$error['notconnected'].' </div>';}

	?>